int removeDuplicates(int* nums, int numsSize)
{
    int front = 1;
    int pre = nums[0];
    for (int i = 1; i < numsSize; i++)
    {
        int cur = nums[i];
        if (cur != pre)
            nums[front++] = nums[i];
        pre = cur;
    }
    return front;
}